home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 52
/
Volume 52 - JOGO DISK .iso
/
Games
/
retroland.swf
/
scripts
/
frame_11
/
DoAction.as
< prev
Wrap
Text File
|
2007-10-01
|
2KB
|
75 lines
function move_wait(enterFrame)
{
if(Key.isDown(Kleft))
{
this.hero._xscale = -100;
this.hero.gotoAndStop("walk");
}
if(Key.isDown(Kright))
{
this.hero._xscale = 100;
this.hero.gotoAndStop("walk");
}
}
function jump_wait()
{
if(Key.isDown(Kjump))
{
this.hero.gotoAndStop("jumpUp");
}
}
function fall_wait()
{
if(!_root.stage.plate.hitTest(this.hero._x,this.hero._y,true))
{
this.hero.gotoAndStop("jumpDown");
}
}
function move_left(valueX)
{
if(!_root.stage.plate.hitTest(this.hero._x - valueX - 8,this.hero._y - 4,true) && _level0.keys !== 1)
{
_root.stage._x += valueX;
_root.back._x += valueX / 4;
}
}
function move_right(valueX)
{
if(!_root.stage.plate.hitTest(this.hero._x + valueX + 8,this.hero._y - 4,true) && _level0.keys !== 1)
{
_root.stage._x -= valueX;
_root.back._x -= valueX / 4;
}
}
_quality = "low";
getUrl("FSCommand:fullscreen", "false");
getUrl("FSCommand:allowscale", "false");
Kleft = 37;
Kright = 39;
Kjump = 32;
walkSpeed = 1.6;
jumpHeight = 7.8;
jumpSpeed = 0.37;
fallSpeed = 2.5;
function jump_down(valueY)
{
if(!_root.stage.plate.hitTest(this.hero._x + 0,this.hero._y - 2,true))
{
this.hero._y += valueY;
}
else
{
i = 1;
while(i <= 20)
{
if(!_root.stage.plate.hitTest(this.hero._x,this.hero._y - i,true))
{
this.hero._y -= i - 1;
break;
}
i++;
}
this.hero.gotoAndStop("stand");
}
}[_level0] = 0();